<?php

namespace App\Models;

use App\Enums\BucketType;
use App\Models\Traits\BelongsToApplication;
use App\Models\Traits\HasEasyStatus;
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;

class Version extends Model
{
    use BelongsToApplication,
        Cachable,
        HasEasyStatus,
        SoftDeletes;

    protected $casts = [
        'type' => BucketType::class,
    ];

    public function logs(): HasMany
    {
        return $this->hasMany(VersionLog::class);
    }
}
